﻿using System;
using System.ComponentModel;

namespace Phylogeny.Dendogram
{
    public class TreeConfig : INotifyPropertyChanged
    {


        private bool _showNodeLabel = false;
        public bool ShowNodeLabel
        {
            get
            {
                return _showNodeLabel;
            }
            set
            {
                _showNodeLabel = value;
                OnPropertyChanged("ShowNodeLabel");
            }
        }

        private bool _showDistanceLabel = false;
        public bool ShowDistanceLabel
        {
            get
            {
                return _showDistanceLabel;
            }
            set
            {
                _showDistanceLabel = value;
                OnPropertyChanged("ShowDistanceLabel");
            }
        }

        private double _scaleFactor = 1;
        public double ScaleFactor
        {
            get
            {
                return _scaleFactor;
            }
            set
            {
                Console.WriteLine("Set ScalFactor to ", value);
                _scaleFactor = value;
                OnPropertyChanged("ScaleFactor");
            }
        }


        #region INotifyPropertyChanged Members

        protected void OnPropertyChanged(string prop)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(prop));
        }
        public event PropertyChangedEventHandler PropertyChanged;

        #endregion
    }

}
